﻿#ifndef WGTSQLSTATUS_H
#define WGTSQLSTATUS_H

#include <QWidget>
#include <QGroupBox>
#include <QLabel>
#include <QMap>
#include <QVBoxLayout>

class WgtOneSqlStatus: public QWidget
{
    Q_OBJECT
public:
    explicit WgtOneSqlStatus(const QString& name = "", QWidget *parent = nullptr);
    void setText(const QString& status);
private:
    QLabel* lblStatus;
};

class WgtSqlStatus : public QGroupBox
{
    Q_OBJECT
public:
    explicit WgtSqlStatus(const QString& title = "", QWidget *parent = nullptr);
    void addOne(QString name);
    void removeOne(QString name);
    void setStatus(QString name, QString status);
signals:

private:
    QMap<QString, WgtOneSqlStatus*> mMapWgtSqlStatus;
    QVBoxLayout* mLayout;
};

#endif // WGTSQLSTATUS_H
